package main

import (
	"fmt"
	"github.com/astaxie/beego/config"
)

func main()  {
	conf, err := config.NewConfig("ini", "./mylog.conf")
	if err != nil {
		fmt.Println("new config failed,errr:",err)
		return
	}
	port, err := conf.Int("server::port")
	if err != nil{
		fmt.Println("read server:port failed, err:",err)
		return
	}
	fmt.Println("port:",port)

	level, err := conf.Int("log::log_level")
	if err != nil{
		fmt.Println("read log:log_level failed, err:",err)
		return
	}
	fmt.Println("log_level:",level)

	path := conf.String("log::log_path")
	fmt.Println("log path :",path)
}
